@extends('home.layouts.app')

@section('title','首页')

@push('css')
{{-- 页面独立的css文件 --}}
<link rel="stylesheet/less" href="{{URL::asset('assets/css/index.less')}}" />
@endpush

<!-- 主体内容 -->
@section('content')
<!-- 搜索 -->
<div class="search">
    <div class="box">
        <div class="icon">
            <span class="glyphicon glyphicon-search"></span>
        </div>

        <form action="{{url('/')}}" method="get">
            <input class="input" name="keyword" placeholder="请输入名字" />

            <button class="btn" size="mini" type="submit">搜索</button>
        </form>
    </div>
</div>

<!-- 分类 -->
<div class="type wow fadeInUp">
    <div class="list">
        <div class="item {{$typeid ? '' : 'active'}}">
            <a href="{{url('/')}}" >全部</a>
        </div>
        @foreach($TypeList as $item)
            <div class="item {{$item->id == $typeid ? 'active' : ''}}">
                <a href="{{url('/',['typeid' => $item->id])}}" >{{$item->name}}</a>
            </div>
        @endforeach
    </div>
</div>

<!-- 列表 -->
<div class="contact wow fadeInUp" data-wow-delay="100ms">
    <div class="list">
        @foreach($ContactList as $item)
            <div class="item">
                <div class="content">
                    <h3 class="title">
                        <a href="{{url('home/contact/edit',['contactid' => $item->id])}}">{{$item->nickname}}</a>
                    </h3>

                    <div class="info">
                        <div class="icon">
                            <image src="{{URL::asset('assets/images/info.png')}}"></image>
                        </div>
                        <div class="desc">
                            {{$item->remark}}
                        </div>
                    </div>
                </div>

                <div class="call icon">
                    <a href="tel:{{$item->phone}}">
                        <image src="{{URL::asset('assets/images/call.png')}}"></image>
                    </a>
                </div>
            </div>
        @endforeach
    </div>
</div>

<!-- 底部导航 -->
@include('home.common.tabbar')
@endsection